package com.example.controller;

import com.example.service.OllamaClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OllamaClientController {

    private final OllamaClientService clientService;

    @Autowired
    public OllamaClientController(OllamaClientService clientService) {
        this.clientService = clientService;
    }

    @GetMapping("/chat-client")
    public String chatWithClient(@RequestParam String message) {
        return clientService.simpleChat(message);
    }

    @GetMapping("/chat-with-system")
    public String chatWithSystem(@RequestParam String message) {
        return clientService.chatWithSystemPrompt(message);
    }
}

